3.1.17 \(\int \frac {1}{(a+b \cos (e+f x)) \sqrt {c+d \sec (e+f x)}} \, dx\) [17]

Optimal. Leaf size=102 \[ \frac {2 \Pi \left (\frac {2 a}{a+b};\text {ArcSin}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sec (e+f x)}{c+d}} \tan (e+f x)}{(a+b) f \sqrt {c+d \sec (e+f x)} \sqrt {-\tan ^2(e+f x)}} \]

[Out]

2*EllipticPi(1/2*(1-sec(f*x+e))^(1/2)*2^(1/2),2*a/(a+b),2^(1/2)*(d/(c+d))^(1/2))*((c+d*sec(f*x+e))/(c+d))^(1/2
)*tan(f*x+e)/(a+b)/f/(c+d*sec(f*x+e))^(1/2)/(-tan(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2908, 4058} \begin {gather*} \frac {2 \tan (e+f x) \sqrt {\frac {c+d \sec (e+f x)}{c+d}} \Pi \left (\frac {2 a}{a+b};\text {ArcSin}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 d}{c+d}\right )}{f (a+b) \sqrt {-\tan ^2(e+f x)} \sqrt {c+d \sec (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + b*Cos[e + f*x])*Sqrt[c + d*Sec[e + f*x]]),x]

[Out]

(2*EllipticPi[(2*a)/(a + b), ArcSin[Sqrt[1 - Sec[e + f*x]]/Sqrt[2]], (2*d)/(c + d)]*Sqrt[(c + d*Sec[e + f*x])/
(c + d)]*Tan[e + f*x])/((a + b)*f*Sqrt[c + d*Sec[e + f*x]]*Sqrt[-Tan[e + f*x]^2])

Rule 2908

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int
[(b + a*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^n/Csc[e + f*x]^m), x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&  !In
tegerQ[n] && IntegerQ[m]

Rule 4058

Int[csc[(e_.) + (f_.)*(x_)]/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))
), x_Symbol] :> Simp[-2*(Cot[e + f*x]/(f*(c + d)*Sqrt[a + b*Csc[e + f*x]]*Sqrt[-Cot[e + f*x]^2]))*Sqrt[(a + b*
Csc[e + f*x])/(a + b)]*EllipticPi[2*(d/(c + d)), ArcSin[Sqrt[1 - Csc[e + f*x]]/Sqrt[2]], 2*(b/(a + b))], x] /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{(a+b \cos (e+f x)) \sqrt {c+d \sec (e+f x)}} \, dx &=\int \frac {\sec (e+f x)}{(b+a \sec (e+f x)) \sqrt {c+d \sec (e+f x)}} \, dx\\ &=\frac {2 \Pi \left (\frac {2 a}{a+b};\sin ^{-1}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sec (e+f x)}{c+d}} \tan (e+f x)}{(a+b) f \sqrt {c+d \sec (e+f x)} \sqrt {-\tan ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 7.19, size = 187, normalized size = 1.83 \begin {gather*} -\frac {2 \sqrt {\frac {d+c \cos (e+f x)}{(c+d) (1+\cos (e+f x))}} \left ((a+b) F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {c-d}{c+d}\right )-2 a \Pi \left (\frac {-a+b}{a+b};\text {ArcSin}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {c-d}{c+d}\right )\right ) \sqrt {\cos (e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\sec (e+f x)} \sqrt {1+\sec (e+f x)}}{(a-b) (a+b) f \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {c+d \sec (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + b*Cos[e + f*x])*Sqrt[c + d*Sec[e + f*x]]),x]

[Out]

(-2*Sqrt[(d + c*Cos[e + f*x])/((c + d)*(1 + Cos[e + f*x]))]*((a + b)*EllipticF[ArcSin[Tan[(e + f*x)/2]], (c -
d)/(c + d)] - 2*a*EllipticPi[(-a + b)/(a + b), ArcSin[Tan[(e + f*x)/2]], (c - d)/(c + d)])*Sqrt[Cos[e + f*x]*S
ec[(e + f*x)/2]^2]*Sqrt[Sec[e + f*x]]*Sqrt[1 + Sec[e + f*x]])/((a - b)*(a + b)*f*Sqrt[Sec[(e + f*x)/2]^2]*Sqrt
[c + d*Sec[e + f*x]])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(236\) vs. \(2(97)=194\).
time = 0.60, size = 237, normalized size = 2.32

method result size
default \(-\frac {2 \sqrt {\frac {d +c \cos \left (f x +e \right )}{\cos \left (f x +e \right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {d +c \cos \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \left (c +d \right )}}\, \left (\cos \left (f x +e \right )+1\right )^{2} \left (\cos \left (f x +e \right )-1\right ) \left (a \EllipticF \left (\frac {\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}, \sqrt {\frac {c -d}{c +d}}\right )+b \EllipticF \left (\frac {\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}, \sqrt {\frac {c -d}{c +d}}\right )-2 a \EllipticPi \left (\frac {\cos \left (f x +e \right )-1}{\sin \left (f x +e \right )}, -\frac {a -b}{a +b}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{f \left (d +c \cos \left (f x +e \right )\right ) \sin \left (f x +e \right )^{2} \left (a -b \right ) \left (a +b \right )}\) \(237\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/f*((d+c*cos(f*x+e))/cos(f*x+e))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*((d+c*cos(f*x+e))/(cos(f*x+e)+1)/(c
+d))^(1/2)*(cos(f*x+e)+1)^2*(cos(f*x+e)-1)*(a*EllipticF((cos(f*x+e)-1)/sin(f*x+e),((c-d)/(c+d))^(1/2))+b*Ellip
ticF((cos(f*x+e)-1)/sin(f*x+e),((c-d)/(c+d))^(1/2))-2*a*EllipticPi((cos(f*x+e)-1)/sin(f*x+e),-(a-b)/(a+b),((c-
d)/(c+d))^(1/2)))/(d+c*cos(f*x+e))/sin(f*x+e)^2/(a-b)/(a+b)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/((b*cos(f*x + e) + a)*sqrt(d*sec(f*x + e) + c)), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(sqrt(d*sec(f*x + e) + c)/(b*c*cos(f*x + e) + a*c + (b*d*cos(f*x + e) + a*d)*sec(f*x + e)), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \cos {\left (e + f x \right )}\right ) \sqrt {c + d \sec {\left (e + f x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))**(1/2),x)

[Out]

Integral(1/((a + b*cos(e + f*x))*sqrt(c + d*sec(e + f*x))), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(1/((b*cos(f*x + e) + a)*sqrt(d*sec(f*x + e) + c)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {c+\frac {d}{\cos \left (e+f\,x\right )}}\,\left (a+b\,\cos \left (e+f\,x\right )\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((c + d/cos(e + f*x))^(1/2)*(a + b*cos(e + f*x))),x)

[Out]

int(1/((c + d/cos(e + f*x))^(1/2)*(a + b*cos(e + f*x))), x)

________________________________________________________________________________________